package com.lx.demonew1.controller;

import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.lx.demonew1.service.AccountService;

@RestController
public class AccountCOntroller {
    @Resource
    private AccountService accountService;
    @GetMapping("transfer")
    public String transfer(){
        try{
            accountService.transferAccount(1,2,100);
            return "转账成功";
        }catch (Exception e){
            System.out.println(e.toString());
            return "转账失败";
        }
    }
}
